package com.huonan.component.thread;

import cn.hutool.bloomfilter.BitSetBloomFilter;

import java.io.IOException;

public class Test2 {
    public static void main(String[] args) {
        //大数据去重
        BitSetBloomFilter bitSetBloomFilter = new BitSetBloomFilter(10, 20, 4);
        try {
            bitSetBloomFilter.init("/Users/lxp/IdeaProjects/Study/MainTest/data/bloom.txt", "UTF-8");
            String number = "456";
            boolean contains = bitSetBloomFilter.contains(number);
            if (contains) {
                System.out.println(number+" 存在");
            }else {
                System.out.println(number+" 不存在");

            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
